<#-- 定义/WEB-INF/struts-tags.tld文件对应的标签库前缀为s -->
<#assign s=JspTaglibs["/WEB-INF/struts-tags.tld"] />

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>${title!"待配置"}</title>
<link href="css/adminPPLive.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="js/comm.js"></script>
<script language="javascript" src="js/tablecell.js"></script>
<script type="text/javascript" src="js/jquery.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.alerts.js" language="javascript"></script>
<!-- s.head-->
<@s.head />
</head>
<body>

<div class="adminRight">
    <div class="adminBorderTop">
        <div class="adminBorderTopLeft"></div>
        <div class="adminBorderTopTitle">
            <div class="adminBorderTopTitleLeft"></div>
            <div class="adminBorderTopTitleMiddle">${title!"待注入"}维护</div>
            <div class="adminBorderTopTitleRight"></div>
        </div>
        <div class="adminBorderTopRight"></div>
    </div>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F7F8F9">
    <tr>
        <td class="adminBorderMiddleLeft"></td>
        <td>
        <div class="admTab">
        <ul>
        ${roleId}
            <li>
                <a href="
                    <@s.url includeContext="true" >
                       <@s.param name="roleId" value="0" />
                       <@s.param name="pageIdx" value="0" />
                    </@s.url>
                    " <#if (roleId=="" || roleId=="0") >class="admTabCut"</#if>>全部
                </a>
            </li>
            <#list roles as x >
            <li>
                <a href="
                    <@s.url includeContext="true" >
                       <@s.param name="roleId" value="${x.id}" />
                       <@s.param name="pageIdx" value="0" />
                    </@s.url>
                    "
                    <#if ( (""+x.id)==roleId)>
                        class="admTabCut"
                    </#if>
                    >${x.name}
                </a>
            </li>
            </#list>
        </ul>
        </div>
        <!--分页开始-->
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td width="60%" colspan="2" align="left" bgcolor="#e7f0f9">
                <div class="admPage">
              
                <@s.component  
                    templateDir="template"
                    theme="pptv"
                    template="pageNavigation.ftl">
                    <@s.param name="curIdx" value="pageIdx" />
                    <@s.param name="pageCount" value="pageSize" />
                    <@s.param name="recordCount" value="recordCount" />
                    <@s.param name="action" value="'user'" />
                    <@s.param name="idxParamName" value="'pageIdx'" />
                </@s.component>
                
                </div>
            </td>
            <form name="form_s"
                  action=
                  <@s.url includeContext="true" >
                      <@s.param name="roleId" value="${roleId}" />
                      <@s.param name="pageIdx" value="0" />
                  </@s.url>
                    
                  method="post" 
                  class="formline">
            <td width="30%" align="right" bgcolor="#e7f0f9">
                <div>用户名：</div>
                <input class="admTextFirst" type="text" name="searchKey" value="${searchKey}" />
                <input name="Submit2" type="submit" value="" style="background-image:url(images/adminSearchBtn.png);width: 59;height: 22;border:0px;cursor:pointer;" />
            </td>
            <td width="30%" align="right" bgcolor="#e7f0f9">
                <div class="admHouseBtn">
                    <li>
                        <a href="">增加</a>
                    </li>
                </div>
            </td>
            </form>
        </tr>
        </table>
        <!--分页结束-->

        <!-- 中间区域 -->
        <table width="80%" border="0" align="center" bgcolor="#cccccc">
            <tr bgcolor="#e1e1e1" >
               <td colspan="4" >
                   <div class="mytitle">当前用户：${session.user!"未定义"}</div>
               </td>
            </tr>
        <tr class="pt9" height="30">
            <td width="20%"><b>ID</b></td>
            <td width="20%"><b>用户名</b></td>
            <td width="20%"><b>用户角色</b></td>
            <td width="60%"><b>操作</b></td>
        </tr>
       
        <#list users as usr>
            ${usr_index}
            <#if (usr_index % 2 == 0)>
            <tr style="background-color:#dddddd" class="pt9" height="24" >
            <#else>
            <tr class="pt9" height="24" >
            </#if>
            <td>${usr.id}</td>
            <td>${usr.userName}</td>
            <td>${usr.role.name}</td>
            <td>
                <a href="userMod?id=${usr.id}">修改</a>
                <a href="userModdo?id=${usr.id}">删除</a>
            </td>
            </tr>
        </#list>
        </table>

        <!--分页开始-->
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr valign="middle">
            <td width="100%" align="left" bgcolor="#e7f0f9">
                <div class="admPage">
                
                <@s.component  
                    templateDir="template"
                    theme="pptv"
                    template="pageNavigation.ftl">
                    <@s.param name="curIdx" value="pageIdx" />
                    <@s.param name="pageCount" value="pageSize" />
                    <@s.param name="recordCount" value="recordCount" />
                    <@s.param name="action" value="'user'" />
                    <@s.param name="idxParamName" value="'pageIdx'" />
                </@s.component>
              
                </div>
            </td>
            </tr>
        </table>
        </td>
        <td class="adminBorderMiddleRight"></td>
    </tr>
    </table>
    <div class="adminBorderBottom">
        <div class="adminBorderBottomLeft"></div>
        <div class="adminBorderBottomRight"></div>
    </div>
</div>




</body>
</html>